<template>
    <nut-dialog title="基础弹框" content="这是基础弹框。" v-model:visible="state.visible" @cancel="onCancel" @ok="onOk" />
</template>

<script lang="ts">
export default { name: '' }
</script>

<script lang="ts" setup>
import { reactive, ref, nextTick, onMounted, useAttrs, useSlots } from 'vue'

// const slots = useSlots()
// const attrs = useAttrs()
// const emits = defineEmits()

const state = reactive({
    visible: false,
    promise: undefined as UndefinedAble<Promise<void>>
})

const open = (content: string) => {
    state.promise = new Promise(() => {

    })
    return state.promise
}

defineExpose({
    open
})
</script>
<style lang="scss" scoped>

</style>